# 遍历
from typing import List

def maxArea(self, height: List[int]) -> int:
    for i in range(len(height)):
            for j in range(len(height)):

                _max = min(height[i],height[j])*abs(i-j)
                if _max > max:
                    max = _max
    return max

# 双指针： 想到了但是没想出判断条件
def maxArea(self, height: List[int]) -> int:
    # 遍历
    """ max = 0
        """
    # 双指针
    i, j = 0, len(height)-1        
    max = 0 
    while i < j:
        _max = min(height[i],height[j])*abs(i-j)
        if _max > max:
            max = _max
        if height[i] >= height[j]:
            j -= 1
        else:
            i += 1
    return max